package com.cz.ssyx.order.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cz.ssyx.model.order.OrderInfo;
import com.cz.ssyx.vo.order.*;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author Joker
 * @since 2024-05-04
 */
public interface OrderInfoService extends IService<OrderInfo> {

    //确认订单
    OrderConfirmVo confirmOrder();

    //生成订单
    Long submitOrder(OrderSubmitVo orderSubmitVo, Long userId);

    //获取订单详情
    OrderInfo getOrderInfoById(Long orderId);

    //订单支付成功，更新订单状态，以及扣减库存
    void orderPay(String orderNo);

    IPage<OrderInfo> findUserOrderPage(Page<OrderInfo> orderInfoPage, OrderUserQueryVo orderConfirmVo);

    IPage<OrderInfo> getOrderPageByQuery(Page<OrderInfo> orderInfoPage, OrderQueryDTO orderQueryDTO);
}
